import { App } from 'vue'

// 自动注册全局组件
const modules = import.meta.globEager('./**/*.vue')
const _default = {
  version: '1.0.0',
  install: (app: App) => {
    for (const path in modules) {
      const name = path.split('/').pop()?.replace('.vue', '') || ''
      app.component(name, modules[path].default)
    }
  }
}

export default _default
